Skip to content

[Unified Search] Move autocomplete logic to unified search plugin#129977

Merged
nlatipov merged 28 commits into
elastic:mainfrom
nlatipov:issue-move-autocomplete-to-unified-search
Apr 22, 2022
Merged

[Unified Search] Move autocomplete logic to unified search plugin#129977
nlatipov merged 28 commits into
elastic:mainfrom
nlatipov:issue-move-autocomplete-to-unified-search

Conversation

@nlatipov
Copy link
Copy Markdown
Contributor

@nlatipov nlatipov commented Apr 12, 2022

Closes: #128383

Summary

Motivation:
After PR #127651 is merged, next step is move the autocomplete folder to the unified_search plugin. No extra functionality is going to be added (or cleanups or improvements).

What was done:

  1. data/plugin/autocomplete folder was moved into unified_search;
  2. data/plugin/server/autocomplete folder was moved into unified_search;
  3. The following part was moved from from the Data Plugin runtime contract to UnifiedSearch Plugin
  autocomplete: this.autocomplete.start(),
  1. Related Static and Runtime imports were updated
  2. Added the unifiedSearch plugin as a dependency to plugins that require plugins (Kibana.json)
  3. Registered a unifiedSearch plugin in the i18n (translations) plugin
  4. data/server/config_deprecations.ts file was moved into unified_search/server and added renameFromRoot for autocomplete;
  5. Added Autocomplete service
  6. config_deprecations.ts file was moved from Data plugin server to UnifiedSearch server folder
  7. Bundle size optimization will be implemented in another pull request issue 129978

@alexwizp alexwizp added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Unified search Unified search related tasks v8.3.0 backport:skip This PR does not require backporting labels Apr 12, 2022
@nlatipov nlatipov marked this pull request as ready for review April 12, 2022 08:50
@nlatipov nlatipov requested review from a team as code owners April 12, 2022 08:50
@nlatipov nlatipov requested a review from a team April 12, 2022 08:50
@nlatipov nlatipov requested review from a team as code owners April 12, 2022 08:50
@nlatipov nlatipov requested a review from pzl April 12, 2022 08:50
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@nlatipov nlatipov requested a review from ashokaditya April 12, 2022 08:50
Copy link
Copy Markdown
Contributor

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in expectedExposedConfigKeys LGTM (from security perspective).

@botelastic botelastic Bot added Team:APM - DEPRECATED Use Team:obs-ux-infra_services. Team:Fleet Team label for Observability Data Collection Fleet team labels Apr 12, 2022
@nlatipov
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugins/security_solution changes look good.

@nlatipov
Copy link
Copy Markdown
Contributor Author

@pzl, @elastic/infra-monitoring-ui, @elastic/security-threat-hunting-investigations we need your 👀 here. Please review

@pzl pzl removed their request for review April 20, 2022 18:14
Copy link
Copy Markdown
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Threat Hunting Investigations changes LGTM! Thanks for doing this work

Copy link
Copy Markdown
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (I hate when prettier just decides to reorder imports while you're doing other things lol)

@nlatipov
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@nlatipov
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@nlatipov
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

expected head sha didn’t match current head ref.

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Cases Cypress Tests on Security Solution / Alerts timeline Privileges: can crud should allow a user with crud privileges to attach alerts to cases

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
controls 180 182 +2
data 470 456 -14
unifiedSearch 143 157 +14
total +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 2811 2803 -8
unifiedSearch 45 75 +30
total +22

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
data 39 38 -1
unifiedSearch 1 2 +1
total -0

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.8MB 2.8MB +9.0B
controls 437.6KB 437.7KB +100.0B
fleet 693.3KB 693.3KB +18.0B
infra 1002.7KB 1002.7KB +18.0B
lens 1.1MB 1.1MB +148.0B
ml 3.3MB 3.3MB +9.0B
monitoring 471.1KB 471.1KB +19.0B
securitySolution 4.8MB 4.8MB +36.0B
synthetics 783.7KB 783.7KB +9.0B
unifiedSearch 138.4KB 116.2KB -22.2KB
total -21.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
data 20 18 -2
unifiedSearch 6 11 +5
total +3

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
controls 34.1KB 34.2KB +53.0B
data 423.1KB 410.9KB -12.2KB
inputControlVis 5.4KB 5.5KB +32.0B
maps 70.1KB 70.1KB +9.0B
ml 39.3KB 39.3KB +30.0B
monitoring 23.5KB 23.7KB +143.0B
unifiedSearch 41.5KB 87.8KB +46.3KB
total +34.3KB
Unknown metric groups

API count

id before after diff
data 3421 3415 -6
unifiedSearch 48 79 +31
total +25

async chunk count

id before after diff
unifiedSearch 10 9 -1

ESLint disabled line counts

id before after diff
data 40 39 -1
unifiedSearch 12 15 +3
total +2

References to deprecated APIs

id before after diff
data 397 375 -22
unifiedSearch 145 253 +108
total +86

Total ESLint disabled count

id before after diff
data 44 43 -1
unifiedSearch 12 15 +3
total +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nlatipov

@nlatipov nlatipov merged commit 7c01257 into elastic:main Apr 22, 2022
@Dosant Dosant mentioned this pull request Apr 25, 2022
1 task
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
…astic#129977)

* feat: move autocomplete logic from data plugin to unified search

* minor fix after comments

* updated Documentation: data.autocomplete -> unifiedSearch.autocomplete

* changed renameFromRoot order for autocomplete

* removed extra renameFromRoot in config deprecations, updated test

* added configPath for unified search plugin

* Update kibana.json

* updated path to autocomplete

* fix conflict

* fix conflict

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix Linting

* fix functional_with_es_ssl test
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…astic#129977)

* feat: move autocomplete logic from data plugin to unified search

* minor fix after comments

* updated Documentation: data.autocomplete -> unifiedSearch.autocomplete

* changed renameFromRoot order for autocomplete

* removed extra renameFromRoot in config deprecations, updated test

* added configPath for unified search plugin

* Update kibana.json

* updated path to autocomplete

* fix conflict

* fix conflict

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix Linting

* fix functional_with_es_ssl test
florent-leborgne added a commit that referenced this pull request May 21, 2026
…269868)

## Summary

This PR addresses elastic/docs-content#6511.

The page [General settings in
Kibana](https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings)
lists \`data.autocomplete.valueSuggestions.terminateAfter\` and
\`data.autocomplete.valueSuggestions.timeout\` without any deprecation
indicator, making them appear as valid current settings.

These settings were deprecated in Kibana 8.3.0 when the autocomplete
logic was moved from the \`data\` plugin to the \`unified_search\`
plugin (now \`kql\`) via
[#129977](#129977). The canonical
settings since 8.3.0 are
\`unifiedSearch.autocomplete.valueSuggestions.terminateAfter\` and
\`unifiedSearch.autocomplete.valueSuggestions.timeout\`.

The backward-compatible deprecation handler (which remaps the old keys
to the new ones with a warning) was accidentally removed in
[#246674](#246674) and restored in
[#268872](#268872) (backported to
v9.4.2 and v9.5.0). During the window between 9.4.0 and 9.4.1, customers
using \`data.autocomplete.*\` in \`kibana.yml\` experienced startup
failures.

All three generations of the settings (\`kibana.*\`, \`data.*\`,
\`unifiedSearch.*\`) are explicitly allowlisted in ECH and work for
users on ECH deployments.

## Changes

- **\`docs/reference/configuration-reference/general-settings.yml\`**:
- Marks \`data.autocomplete.valueSuggestions.terminateAfter\` and
\`data.autocomplete.valueSuggestions.timeout\` as \`deprecated 8.3\` on
stack, with \`deprecation_details\` pointing to the \`unifiedSearch.*\`
replacements.
- Adds an inline note on both deprecated settings warning that using
them in Kibana 9.4.0–9.4.1 causes a startup failure, and advising users
to migrate or upgrade.
- Adds \`unifiedSearch.autocomplete.valueSuggestions.timeout\` and
\`unifiedSearch.autocomplete.valueSuggestions.terminateAfter\` as
\`stack: ga 8.3\` entries so the canonical settings are properly
documented.

## Resolves

Closes elastic/docs-content#6511

---

> **AI-assisted draft** — created with Claude Sonnet 4.6 in Cursor.
> Review all generated content for factual accuracy before merging.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request May 22, 2026
…lastic#269868)

## Summary

This PR addresses elastic/docs-content#6511.

The page [General settings in
Kibana](https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings)
lists \`data.autocomplete.valueSuggestions.terminateAfter\` and
\`data.autocomplete.valueSuggestions.timeout\` without any deprecation
indicator, making them appear as valid current settings.

These settings were deprecated in Kibana 8.3.0 when the autocomplete
logic was moved from the \`data\` plugin to the \`unified_search\`
plugin (now \`kql\`) via
[elastic#129977](elastic#129977). The canonical
settings since 8.3.0 are
\`unifiedSearch.autocomplete.valueSuggestions.terminateAfter\` and
\`unifiedSearch.autocomplete.valueSuggestions.timeout\`.

The backward-compatible deprecation handler (which remaps the old keys
to the new ones with a warning) was accidentally removed in
[elastic#246674](elastic#246674) and restored in
[elastic#268872](elastic#268872) (backported to
v9.4.2 and v9.5.0). During the window between 9.4.0 and 9.4.1, customers
using \`data.autocomplete.*\` in \`kibana.yml\` experienced startup
failures.

All three generations of the settings (\`kibana.*\`, \`data.*\`,
\`unifiedSearch.*\`) are explicitly allowlisted in ECH and work for
users on ECH deployments.

## Changes

- **\`docs/reference/configuration-reference/general-settings.yml\`**:
- Marks \`data.autocomplete.valueSuggestions.terminateAfter\` and
\`data.autocomplete.valueSuggestions.timeout\` as \`deprecated 8.3\` on
stack, with \`deprecation_details\` pointing to the \`unifiedSearch.*\`
replacements.
- Adds an inline note on both deprecated settings warning that using
them in Kibana 9.4.0–9.4.1 causes a startup failure, and advising users
to migrate or upgrade.
- Adds \`unifiedSearch.autocomplete.valueSuggestions.timeout\` and
\`unifiedSearch.autocomplete.valueSuggestions.terminateAfter\` as
\`stack: ga 8.3\` entries so the canonical settings are properly
documented.

## Resolves

Closes elastic/docs-content#6511

---

> **AI-assisted draft** — created with Claude Sonnet 4.6 in Cursor.
> Review all generated content for factual accuracy before merging.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:all-cypress-suites Feature:Unified search Unified search related tasks release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. Team:Fleet Team label for Observability Data Collection Fleet team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Unified search] Move the autocomplete logic to the unified search plugin